#include "MediaStateEstablished.h"
#include "MediaStateMap.h"
#include "Trace.h"

namespace tsc
{
namespace mgw
{

using namespace tsc::common;

/*******************************************************************************
 *
 * Constructor
 *
 ******************************************************************************/
MediaStateEstablished::MediaStateEstablished() :
	MediaStateBase("Established")
{

} // MediaStateEstablished::MediaStateEstablished

/*******************************************************************************
 *
 * Destructor
 *
 ******************************************************************************/
MediaStateEstablished::~MediaStateEstablished()
{

} // MediaStateEstablished::~MediaStateEstablished

//===================================================================
MediaStateEstablished* MediaStateEstablished::instance()
{
	static MediaStateEstablished mInstance;
	return &mInstance;
}

//===================================================================
void
MediaStateEstablished::handleEventReleaseConnection(
    MediaGenerator* gen,
    MediaEventReleaseConnection* event,
    EventData*& eventData)
{
    TRACE_ERROR("NOT implemented yet");
    // TODO do cleanup
    // stop sending data, close socket, etc
    EventData::deleteEvent(eventData);
}

} // namespace mgw
} // namespace tsc
